package com.cy.beanutils.benchmark;

import org.springframework.cglib.core.Converter;

public class CarConverter implements Converter {
    @Override
    public Object convert(Object source, Class target, Object ctx) {
        if (source instanceof CarType) {
            return ((CarType) source).name();
        } else if (source instanceof Integer) {
            return source;
        } else if (source instanceof String) {
            return source;
        }
        return null;
    }
}
